Skip to content

fix: 콜벤 요약 정보 단건 조회 API 추가#2181

Merged
DHkimgit merged 2 commits intodevelopfrom
feat/2180-callvan-post-single-response
Mar 16, 2026
Merged

fix: 콜벤 요약 정보 단건 조회 API 추가#2181
DHkimgit merged 2 commits intodevelopfrom
feat/2180-callvan-post-single-response

Conversation

@DHkimgit
Copy link
Collaborator

@DHkimgit DHkimgit commented Mar 16, 2026

🔍 개요


🚀 주요 변경 내용

  • 클라이언트 요청으로 콜벤 상태 갱신용 요약 정보 조회 API 추가

💬 참고 사항


✅ Checklist (완료 조건)

  • 코드 스타일 가이드 준수
  • 테스트 코드 포함됨
  • Reviewers / Assignees / Labels 지정 완료
  • 보안 및 민감 정보 검증 (API 키, 환경 변수, 개인정보 등)

Summary by CodeRabbit

  • New Features
    • Added GET /posts/{postId}/summary endpoint to fetch a Callvan post summary.
    • Returns post details and indicates whether the current user has joined (when authenticated).

@DHkimgit DHkimgit self-assigned this Mar 16, 2026
@DHkimgit DHkimgit added 기능 새로운 기능을 개발합니다. Team Campus 캠퍼스 팀에서 작업할 이슈입니다 labels Mar 16, 2026
@github-actions github-actions bot requested review from duehee and krSeonghyeon March 16, 2026 09:52
@coderabbitai
Copy link

coderabbitai bot commented Mar 16, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: e86c6a87-08cf-41b5-b8a0-1032ea7bd8f5

📥 Commits

Reviewing files that changed from the base of the PR and between d5a5e78 and f69d255.

📒 Files selected for processing (1)
  • src/main/java/in/koreatech/koin/domain/callvan/service/CallvanPostQueryService.java
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/main/java/in/koreatech/koin/domain/callvan/service/CallvanPostQueryService.java

📝 Walkthrough

Walkthrough

Adds a new GET /posts/{postId}/summary endpoint across API, controller, and service layers to return a single Callvan post summary and mark isJoined for the requesting user.

Changes

Cohort / File(s) Summary
API & Controller
src/main/java/in/koreatech/koin/domain/callvan/controller/CallvanApi.java, src/main/java/in/koreatech/koin/domain/callvan/controller/CallvanController.java
New endpoint GET /posts/{postId}/summary declared and implemented; controller delegates to service and returns CallvanPostSearchResponse.CallvanPostResponse.
Service
src/main/java/in/koreatech/koin/domain/callvan/service/CallvanPostQueryService.java
Added getCallvanPostSummary(Integer postId, Integer userId) which loads the post, checks participation to compute isJoined, and constructs the response.

Sequence Diagram(s)

sequenceDiagram
    participant Client as Client
    participant API as CallvanApi
    participant Controller as CallvanController
    participant Service as CallvanPostQueryService
    participant Repo as CallvanPostRepository

    Client->>API: GET /posts/{postId}/summary (userId)
    API->>Controller: forward request
    Controller->>Service: getCallvanPostSummary(postId, userId)
    Service->>Repo: find post by postId
    Repo-->>Service: post entity
    Service->>Repo: check participation (postId, userId)
    Repo-->>Service: participation exists? (bool)
    Service-->>Controller: CallvanPostResponse(post, isJoined, userId)
    Controller-->>API: ResponseEntity<CallvanPostResponse>
    API-->>Client: 200 OK / 404 Not Found
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Suggested reviewers

  • ImTotem
  • dh2906
  • duehee
  • krSeonghyeon
  • Soundbar91

Poem

🐰 I hopped a path from code to sun,
A summary endpoint—quickly done,
Post by ID, a tidy find,
Marks who joined, leaves none behind,
Cheers from a rabbit, tail a-spin! ✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main change: adding a single-item call-van summary information retrieval API, which aligns with the changeset additions.
Linked Issues check ✅ Passed The PR successfully implements the core requirement from issue #2180: a feature to retrieve single call-van summary information with proper API endpoints, service logic, and userId handling for client status updates.
Out of Scope Changes check ✅ Passed All changes are directly related to implementing the single call-van summary retrieval API across controller, service, and interface layers as specified in issue #2180.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/2180-callvan-post-single-response
📝 Coding Plan
  • Generate coding plan for human review comments

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Tip

You can enable review details to help with troubleshooting, context usage and more.

Enable the reviews.review_details setting to include review details such as the model used, the time taken for each step and more in the review comments.

@github-actions
Copy link

github-actions bot commented Mar 16, 2026

Unit Test Results

690 tests   687 ✔️  1m 23s ⏱️
169 suites      3 💤
169 files        0

Results for commit f69d255.

♻️ This comment has been updated with latest results.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In
`@src/main/java/in/koreatech/koin/domain/callvan/service/CallvanPostQueryService.java`:
- Around line 119-123: In getCallvanPostSummary, avoid passing a nullable userId
into callvanParticipantRepository.existsByPostIdAndMemberIdAndIsDeletedFalse;
instead, short-circuit when userId is null by setting isJoined = false,
otherwise call existsByPostIdAndMemberIdAndIsDeletedFalse(postId, userId). Keep
the CallvanPost retrieval (callvanPostRepository.getById(postId)) unchanged and
pass the computed isJoined and userId into
CallvanPostSearchResponse.CallvanPostResponse.from.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 00d41393-de5c-4b37-baf8-08a19c87ac28

📥 Commits

Reviewing files that changed from the base of the PR and between 9dbfd9c and d5a5e78.

📒 Files selected for processing (3)
  • src/main/java/in/koreatech/koin/domain/callvan/controller/CallvanApi.java
  • src/main/java/in/koreatech/koin/domain/callvan/controller/CallvanController.java
  • src/main/java/in/koreatech/koin/domain/callvan/service/CallvanPostQueryService.java

Copy link
Contributor

@dh2906 dh2906 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

고생하셨습니다!

1. 존재하지 않는 게시글(`NOT_FOUND_ARTICLE`)이면 예외가 발생합니다.
2. 로그인된 사용자의 경우, 해당 콜벤 게시글에 합류한 상태면 `isJoined` 필드가 true로 표시됩니다.
""")
@GetMapping("/posts/{postId}/summary")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
@GetMapping("/posts/{postId}/summary")
@GetMapping("/posts/{postId}")

이런 식으로 하지 않은 이유가 궁금합니당 👀

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@GetMapping("/posts/{postId}")
    public ResponseEntity<CallvanPostDetailResponse> getCallvanPostDetail(
        @PathVariable Integer postId,
        @UserId Integer userId
    )

다른 API에서 쓰고 있어요 ㅠ

@DHkimgit DHkimgit merged commit f244479 into develop Mar 16, 2026
7 checks passed
@DHkimgit DHkimgit deleted the feat/2180-callvan-post-single-response branch March 16, 2026 10:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Team Campus 캠퍼스 팀에서 작업할 이슈입니다 기능 새로운 기능을 개발합니다.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[캠퍼스] 콜벤 목록 정보 단건 조회 기능

3 participants